home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / geralpha / galphac.bst < prev    next >
Text File  |  1992-05-04  |  27KB  |  1,341 lines

  1. % Adapted bibliography style `galphac' that changes several english-language
  2. % ``constants'' in the style.
  3. %
  4. %%     Umlaut-Problem geloest (M\"arz) 7.2.1992
  5. %%     Andreas Schilling, WSI/GRIS, 7400 T\"ubingen
  6. %%     andreas@gris.informatik.uni-tuebingen.de
  7. %
  8. %  titles of non-"books" (e.g., articles) not converted to lower-case
  9. %  (they appear as in the database)
  10. %
  11. % Copyright of the changes (C) 1990 by
  12. %  Robert Tolksdorf
  13. %  K\"ortestr. 30
  14. %  D-1000 Berlin 61
  15. %  West Germany
  16. %
  17. % NO WARRANTY!
  18. %
  19. % Version 0   as of 28.05.90
  20. %         0.1       31.07.90
  21. %         1.0       21.09.90
  22. % HOW TO FIND THE CHANGES:
  23. %  Since there were no comments in my original ``alpha''-style all comment-
  24. %  lines denote my changes.
  25. % PROBLEMS:
  26. %  I had problems to change the month-name ``March'' into ``M\"arz''. Somehow
  27. %  the umlaut is not accepted. Experimenting with "a from the
  28. %  ``german''-option did not work as well. If you have a hint how to include
  29. %  umlauts in a bst, please report.
  30. % OUTLOOK:
  31. %  This file could be used as a guide to change the other
  32. %  standard-styles. Since I am using only ``alpha'' as I prefer to have
  33. %  those impressing looking abbreviations in my bibliographies, I am too
  34. %  lazy to publish a complete set of bibliography-styles. If you adapt
  35. %  another style, please send a copy (5 1/4" or 3 1/2", 360 KB or 720 KB,
  36. %  no HD-disks!).
  37. % BUGS:
  38. %  There may still be some entries or fields that are not adapted. I am
  39. %  developping this style for about one year, but surely do not have used
  40. %  all entry-types or entry-field-combinations. Please report any
  41. %  anormalities!
  42. %
  43.  
  44. % BibTeX standard bibliography style `alpha'
  45.         % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  46.         % Copyright (C) 1985, all rights reserved.
  47.         % Copying of this file is authorized only if either
  48.         % (1) you make absolutely no changes to your copy, including name, or
  49.         % (2) if you do make changes, you name it something other than
  50.         % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  51.         % This restriction helps ensure that all standard styles are identical.
  52.         % The file btxbst.doc has the documentation for this style.
  53.  
  54. ENTRY
  55.   { address
  56.     author
  57.     booktitle
  58.     chapter
  59.     edition
  60.     editor
  61.     howpublished
  62.     institution
  63.     journal
  64.     key
  65.     month
  66.     note
  67.     number
  68.     organization
  69.     pages
  70.     publisher
  71.     school
  72.     series
  73.     title
  74.     type
  75.     volume
  76.     year
  77.   }
  78.   {}
  79.   { label extra.label sort.label }
  80.  
  81. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  82.  
  83. FUNCTION {init.state.consts}
  84. { #0 'before.all :=
  85.   #1 'mid.sentence :=
  86.   #2 'after.sentence :=
  87.   #3 'after.block :=
  88. }
  89.  
  90. STRINGS { s t }
  91.  
  92. FUNCTION {output.nonnull}
  93. { 's :=
  94.   output.state mid.sentence =
  95.     { ", " * write$ }
  96.     { output.state after.block =
  97.         { add.period$ write$
  98.           newline$
  99.           "\newblock " write$
  100.         }
  101.         { output.state before.all =
  102.             'write$
  103.             { add.period$ " " * write$ }
  104.           if$
  105.         }
  106.       if$
  107.       mid.sentence 'output.state :=
  108.     }
  109.   if$
  110.   s
  111. }
  112.  
  113. FUNCTION {output}
  114. { duplicate$ empty$
  115.     'pop$
  116.     'output.nonnull
  117.   if$
  118. }
  119.  
  120. FUNCTION {output.check}
  121. { 't :=
  122.   duplicate$ empty$
  123.     { pop$ "empty " t * " in " * cite$ * warning$ }
  124.     'output.nonnull
  125.   if$
  126. }
  127.  
  128. FUNCTION {output.bibitem}
  129. { newline$
  130.   "\bibitem[" write$
  131.   label write$
  132.   "]{" write$
  133.   cite$ write$
  134.   "}" write$
  135.   newline$
  136.   ""
  137.   before.all 'output.state :=
  138. }
  139.  
  140. FUNCTION {fin.entry}
  141. { add.period$
  142.   write$
  143.   newline$
  144. }
  145.  
  146. FUNCTION {new.block}
  147. { output.state before.all =
  148.     'skip$
  149.     { after.block 'output.state := }
  150.   if$
  151. }
  152.  
  153. FUNCTION {new.sentence}
  154. { output.state after.block =
  155.     'skip$
  156.     { output.state before.all =
  157.         'skip$
  158.         { after.sentence 'output.state := }
  159.       if$
  160.     }
  161.   if$
  162. }
  163.  
  164. FUNCTION {not}
  165. {   { #0 }
  166.     { #1 }
  167.   if$
  168. }
  169.  
  170. FUNCTION {and}
  171. {   'skip$
  172.     { pop$ #0 }
  173.   if$
  174. }
  175.  
  176. FUNCTION {or}
  177. {   { pop$ #1 }
  178.     'skip$
  179.   if$
  180. }
  181.  
  182. FUNCTION {new.block.checka}
  183. { empty$
  184.     'skip$
  185.     'new.block
  186.   if$
  187. }
  188.  
  189. FUNCTION {new.block.checkb}
  190. { empty$
  191.   swap$ empty$
  192.   and
  193.     'skip$
  194.     'new.block
  195.   if$
  196. }
  197.  
  198. FUNCTION {new.sentence.checka}
  199. { empty$
  200.     'skip$
  201.     'new.sentence
  202.   if$
  203. }
  204.  
  205. FUNCTION {new.sentence.checkb}
  206. { empty$
  207.   swap$ empty$
  208.   and
  209.     'skip$
  210.     'new.sentence
  211.   if$
  212. }
  213.  
  214. FUNCTION {field.or.null}
  215. { duplicate$ empty$
  216.     { pop$ "" }
  217.     'skip$
  218.   if$
  219. }
  220.  
  221. FUNCTION {emphasize}
  222. { duplicate$ empty$
  223.     { pop$ "" }
  224.     { "{\em " swap$ * "}" * }
  225.   if$
  226. }
  227.  
  228. INTEGERS { nameptr namesleft numnames }
  229.  
  230. FUNCTION {format.names}
  231. { 's :=
  232.   #1 'nameptr :=
  233.   s num.names$ 'numnames :=
  234.   numnames 'namesleft :=
  235.     { namesleft #0 > }
  236.     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  237.       nameptr #1 >
  238.         { namesleft #1 >
  239.             { ", " * t * }
  240. %
  241. % Now here we have discovered a bug. The bibliography of the LaTeX-book shows
  242. % the fault: If there are three or more authors, then the final ``and'' before
  243. % the last author's name is preceeded by a comma. This looks ugly and is
  244. % wrong.
  245. % The original and faulty line in format.names reads
  246. %            { numnames #2 >
  247. % Actually the generation of the comma is dependent on the number of names
  248. % left. Therefore:
  249. %
  250.             { namesleft #2 >
  251.                 { "," * }
  252.                 'skip$
  253.               if$
  254.               t "others" =
  255.                 { " et~al." * }
  256. % ``and'' is ``und'' in German
  257.                 { " und " * t * }
  258.               if$
  259.             }
  260.           if$
  261.         }
  262.         't
  263.       if$
  264.       nameptr #1 + 'nameptr :=
  265.       namesleft #1 - 'namesleft :=
  266.     }
  267.   while$
  268. }
  269.  
  270. FUNCTION {format.authors}
  271. { author empty$
  272.     { "" }
  273.     { author format.names }
  274.   if$
  275. }
  276.  
  277. FUNCTION {format.editors}
  278. { editor empty$
  279.     { "" }
  280.     { editor format.names
  281.       editor num.names$ #1 >
  282. % Let's call them ``Herausgeber''
  283. %        { ", editors" * }
  284. %        { ", editor" * }
  285.         { ", Hrsg." * }
  286.         { ", Hrsg." * }
  287.       if$
  288.     }
  289.   if$
  290. }
  291.  
  292. FUNCTION {format.title}
  293. { title empty$
  294.     { "" }
  295. % I want the title as typed in the database here RT
  296. %    { title "t" change.case$ }
  297.     'title
  298.   if$
  299. }
  300.  
  301. FUNCTION {n.dashify}
  302. { 't :=
  303.   ""
  304.     { t empty$ not }
  305.     { t #1 #1 substring$ "-" =
  306.         { t #1 #2 substring$ "--" = not
  307.             { "--" *
  308.               t #2 global.max$ substring$ 't :=
  309.             }
  310.             {   { t #1 #1 substring$ "-" = }
  311.                 { "-" *
  312.                   t #2 global.max$ substring$ 't :=
  313.                 }
  314.               while$
  315.             }
  316.           if$
  317.         }
  318.         { t #1 #1 substring$ *
  319.           t #2 global.max$ substring$ 't :=
  320.         }
  321.       if$
  322.     }
  323.   while$
  324. }
  325.  
  326. FUNCTION {format.date}
  327. { year empty$
  328.     { month empty$
  329.         { "" }
  330.         { "there's a month but no year in " cite$ * warning$
  331.           month
  332.         }
  333.       if$
  334.     }
  335.     { month empty$
  336.         'year
  337.         { month " " * year * }
  338.       if$
  339.     }
  340.   if$
  341. }
  342.  
  343. FUNCTION {format.btitle}
  344. { title emphasize
  345. }
  346.  
  347. FUNCTION {tie.or.space.connect}
  348. { duplicate$ text.length$ #3 <
  349.     { "~" }
  350.     { " " }
  351.   if$
  352.   swap$ * *
  353. }
  354.  
  355. FUNCTION {either.or.check}
  356. { empty$
  357.     'pop$
  358.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  359.   if$
  360. }
  361.  
  362. FUNCTION {format.bvolume}
  363. { volume empty$
  364.     { "" }
  365. % ``volume'' is ``Jahrgang'' in German. The abbrv. is ``Jgg.'' (DUDEN)
  366. %   { "volume" volume tie.or.space.connect
  367.     { "Jgg." volume tie.or.space.connect
  368.       series empty$
  369.         'skip$
  370.         { " of " * series emphasize * }
  371.       if$
  372.       "volume and number" number either.or.check
  373.     }
  374.   if$
  375. }
  376.  
  377. FUNCTION {format.number.series}
  378. { volume empty$
  379.     { number empty$
  380.         { series field.or.null }
  381.         { output.state mid.sentence =
  382.             { "number" }
  383.             { "Number" }
  384.           if$
  385.           number tie.or.space.connect
  386.           series empty$
  387.             { "there's a number but no series in " cite$ * warning$ }
  388.             { " in " * series * }
  389.           if$
  390.         }
  391.       if$
  392.     }
  393.     { "" }
  394.   if$
  395. }
  396.  
  397. FUNCTION {format.edition}
  398. { edition empty$
  399.     { "" }
  400.     { output.state mid.sentence =
  401. % `edition' is `Auflage' in german
  402. %        { edition "l" change.case$ " edition" * }
  403. %        { edition "t" change.case$ " edition" * }
  404.         { edition "l" change.case$ ".~Auflage" * }
  405.         { edition "t" change.case$ ".~Auflage" * }
  406.       if$
  407.     }
  408.   if$
  409. }
  410.  
  411. INTEGERS { multiresult }
  412.  
  413. FUNCTION {multi.page.check}
  414. { 't :=
  415.   #0 'multiresult :=
  416.     { multiresult not
  417.       t empty$ not
  418.       and
  419.     }
  420.     { t #1 #1 substring$
  421.       duplicate$ "-" =
  422.       swap$ duplicate$ "," =
  423.       swap$ "+" =
  424.       or or
  425.         { #1 'multiresult := }
  426.         { t #2 global.max$ substring$ 't := }
  427.       if$
  428.     }
  429.   while$
  430.   multiresult
  431. }
  432.  
  433. FUNCTION {format.pages}
  434. { pages empty$
  435.     { "" }
  436.     { pages multi.page.check
  437. % Let's call ``page'' ``Seite''
  438. %        { "pages" pages n.dashify tie.or.space.connect }
  439. %        { "page" pages tie.or.space.connect }
  440.         { "Seiten" pages n.dashify tie.or.space.connect }
  441.         { "Seite" pages tie.or.space.connect }
  442.       if$
  443.     }
  444.   if$
  445. }
  446.  
  447. FUNCTION {format.vol.num.pages}
  448. { volume field.or.null
  449.   number empty$
  450.     'skip$
  451.     { "(" number * ")" * *
  452.       volume empty$
  453.         { "there's a number but no volume in " cite$ * warning$ }
  454.         'skip$
  455.       if$
  456.     }
  457.   if$
  458.   pages empty$
  459.     'skip$
  460.     { duplicate$ empty$
  461.         { pop$ format.pages }
  462.         { ":" * pages n.dashify * }
  463.       if$
  464.     }
  465.   if$
  466. }
  467.  
  468. FUNCTION {format.chapter.pages}
  469. { chapter empty$
  470.     'format.pages
  471.     { type empty$
  472. % ``chapter'' is ``Kapitel'' in German
  473. %        { "chapter" }
  474.         { "Kapitel" }
  475.         { type "l" change.case$ }
  476.       if$
  477.       chapter tie.or.space.connect
  478.       pages empty$
  479.         'skip$
  480.         { ", " * format.pages * }
  481.       if$
  482.     }
  483.   if$
  484. }
  485.  
  486. FUNCTION {format.in.ed.booktitle}
  487. { booktitle empty$
  488.     { "" }
  489.     { editor empty$
  490.         { "In " booktitle emphasize * }
  491.         { "In " format.editors * ", " * booktitle emphasize * }
  492.       if$
  493.     }
  494.   if$
  495. }
  496.  
  497. FUNCTION {empty.misc.check}
  498. { author empty$ title empty$ howpublished empty$
  499.   month empty$ year empty$ note empty$
  500.   and and and and and
  501.   key empty$ not and
  502.     { "all relevant fields are empty in " cite$ * warning$ }
  503.     'skip$
  504.   if$
  505. }
  506.  
  507. FUNCTION {format.thesis.type}
  508. { type empty$
  509.     'skip$
  510.     { pop$
  511.       type "t" change.case$
  512.     }
  513.   if$
  514. }
  515.  
  516. FUNCTION {format.tr.number}
  517. { type empty$
  518.     { "Technical Report" }
  519.     'type
  520.   if$
  521.   number empty$
  522.     { "t" change.case$ }
  523.     { number tie.or.space.connect }
  524.   if$
  525. }
  526.  
  527. FUNCTION {format.article.crossref}
  528. { key empty$
  529.     { journal empty$
  530.         { "need key or journal for " cite$ * " to crossref " * crossref *
  531.           warning$
  532.           ""
  533.         }
  534.         { "In {\em " journal * "\/}" * }
  535.       if$
  536.     }
  537.     { "In " key * }
  538.   if$
  539.   " \cite{" * crossref * "}" *
  540. }
  541.  
  542. FUNCTION {format.crossref.editor}
  543. { editor #1 "{vv~}{ll}" format.name$
  544.   editor num.names$ duplicate$
  545.   #2 >
  546.     { pop$ " et~al." * }
  547.     { #2 <
  548.         'skip$
  549.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  550.             { " et~al." * }
  551. % ``and'' is ``und'' in German
  552.             { " und " * editor #2 "{vv~}{ll}" format.name$ * }
  553.           if$
  554.         }
  555.       if$
  556.     }
  557.   if$
  558. }
  559.  
  560. FUNCTION {format.book.crossref}
  561. { volume empty$
  562.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  563.       "In "
  564.     }
  565. % ``volume'' is ``Jahrgang'' in German. See above
  566. %   { "volume" volume tie.or.space.connect
  567.     { "Jgg." volume tie.or.space.connect
  568.       " of " *
  569.     }
  570.   if$
  571.   editor empty$
  572.   editor field.or.null author field.or.null =
  573.   or
  574.     { key empty$
  575.         { series empty$
  576.             { "need editor, key, or series for " cite$ * " to crossref " *
  577.               crossref * warning$
  578.               "" *
  579.             }
  580.             { "{\em " * series * "\/}" * }
  581.           if$
  582.         }
  583.         { key * }
  584.       if$
  585.     }
  586.     { format.crossref.editor * }
  587.   if$
  588.   " \cite{" * crossref * "}" *
  589. }
  590.  
  591. FUNCTION {format.incoll.inproc.crossref}
  592. { editor empty$
  593.   editor field.or.null author field.or.null =
  594.   or
  595.     { key empty$
  596.         { booktitle empty$
  597.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  598.               crossref * warning$
  599.               ""
  600.             }
  601.             { "In {\em " booktitle * "\/}" * }
  602.           if$
  603.         }
  604.         { "In " key * }
  605.       if$
  606.     }
  607.     { "In " format.crossref.editor * }
  608.   if$
  609.   " \cite{" * crossref * "}" *
  610. }
  611.  
  612. FUNCTION {article}
  613. { output.bibitem
  614.   format.authors "author" output.check
  615.   new.block
  616.   format.title "title" output.check
  617.   new.block
  618.   crossref missing$
  619.     { journal emphasize "journal" output.check
  620.       format.vol.num.pages output
  621.       format.date "year" output.check
  622.     }
  623.     { format.article.crossref output.nonnull
  624.       format.pages output
  625.     }
  626.   if$
  627.   new.block
  628.   note output
  629.   fin.entry
  630. }
  631.  
  632. FUNCTION {book}
  633. { output.bibitem
  634.   author empty$
  635.     { format.editors "author and editor" output.check }
  636.     { format.authors output.nonnull
  637.       crossref missing$
  638.         { "author and editor" editor either.or.check }
  639.         'skip$
  640.       if$
  641.     }
  642.   if$
  643.   new.block
  644.   format.btitle "title" output.check
  645.   crossref missing$
  646.     { format.bvolume output
  647.       new.block
  648.       format.number.series output
  649.       new.sentence
  650.       publisher "publisher" output.check
  651.       address output
  652.     }
  653.     { new.block
  654.       format.book.crossref output.nonnull
  655.     }
  656.   if$
  657.   format.edition output
  658.   format.date "year" output.check
  659.   new.block
  660.   note output
  661.   fin.entry
  662. }
  663.  
  664. FUNCTION {booklet}
  665. { output.bibitem
  666.   format.authors output
  667.   new.block
  668.   format.title "title" output.check
  669.   howpublished address new.block.checkb
  670.   howpublished output
  671.   address output
  672.   format.date output
  673.   new.block
  674.   note output
  675.   fin.entry
  676. }
  677.  
  678. FUNCTION {inbook}
  679. { output.bibitem
  680.   author empty$
  681.     { format.editors "author and editor" output.check }
  682.     { format.authors output.nonnull
  683.       crossref missing$
  684.         { "author and editor" editor either.or.check }
  685.         'skip$
  686.       if$
  687.     }
  688.   if$
  689.   new.block
  690.   format.btitle "title" output.check
  691.   crossref missing$
  692.     { format.bvolume output
  693.       format.chapter.pages "chapter and pages" output.check
  694.       new.block
  695.       format.number.series output
  696.       new.sentence
  697.       publisher "publisher" output.check
  698.       address output
  699.     }
  700.     { format.chapter.pages "chapter and pages" output.check
  701.       new.block
  702.       format.book.crossref output.nonnull
  703.     }
  704.   if$
  705.   format.edition output
  706.   format.date "year" output.check
  707.   new.block
  708.   note output
  709.   fin.entry
  710. }
  711.  
  712. FUNCTION {incollection}
  713. { output.bibitem
  714.   format.authors "author" output.check
  715.   new.block
  716.   format.title "title" output.check
  717.   new.block
  718.   crossref missing$
  719.     { format.in.ed.booktitle "booktitle" output.check
  720.       format.bvolume output
  721.       format.number.series output
  722.       format.chapter.pages output
  723.       new.sentence
  724.       publisher "publisher" output.check
  725.       address output
  726.       format.edition output
  727.       format.date "year" output.check
  728.     }
  729.     { format.incoll.inproc.crossref output.nonnull
  730.       format.chapter.pages output
  731.     }
  732.   if$
  733.   new.block
  734.   note output
  735.   fin.entry
  736. }
  737.  
  738. FUNCTION {inproceedings}
  739. { output.bibitem
  740.   format.authors "author" output.check
  741.   new.block
  742.   format.title "title" output.check
  743.   new.block
  744.   crossref missing$
  745.     { format.in.ed.booktitle "booktitle" output.check
  746.       format.bvolume output
  747.       format.number.series output
  748.       format.pages output
  749.       address empty$
  750.         { organization publisher new.sentence.checkb
  751.           organization output
  752.           publisher output
  753.           format.date "year" output.check
  754.         }
  755.         { address output.nonnull
  756.           format.date "year" output.check
  757.           new.sentence
  758.           organization output
  759.           publisher output
  760.         }
  761.       if$
  762.     }
  763.     { format.incoll.inproc.crossref output.nonnull
  764.       format.pages output
  765.     }
  766.   if$
  767.   new.block
  768.   note output
  769.   fin.entry
  770. }
  771.  
  772. FUNCTION {conference} { inproceedings }
  773.  
  774. FUNCTION {manual}
  775. { output.bibitem
  776.   author empty$
  777.     { organization empty$
  778.         'skip$
  779.         { organization output.nonnull
  780.           address output
  781.         }
  782.       if$
  783.     }
  784.     { format.authors output.nonnull }
  785.   if$
  786.   new.block
  787.   format.btitle "title" output.check
  788.   author empty$
  789.     { organization empty$
  790.         { address new.block.checka
  791.           address output
  792.         }
  793.         'skip$
  794.       if$
  795.     }
  796.     { organization address new.block.checkb
  797.       organization output
  798.       address output
  799.     }
  800.   if$
  801.   format.edition output
  802.   format.date output
  803.   new.block
  804.   note output
  805.   fin.entry
  806. }
  807.  
  808. FUNCTION {mastersthesis}
  809. { output.bibitem
  810.   format.authors "author" output.check
  811.   new.block
  812.   format.title "title" output.check
  813.   new.block
  814. % A Master's thesis thesis is called ``Diplomarbeit'' in German
  815. %  "Master's thesis" format.thesis.type output.nonnull
  816.   "Diplomarbeit" format.thesis.type output.nonnull
  817.   school "school" output.check
  818.   address output
  819.   format.date "year" output.check
  820.   new.block
  821.   note output
  822.   fin.entry
  823. }
  824.  
  825. FUNCTION {misc}
  826. { output.bibitem
  827.   format.authors output
  828.   title howpublished new.block.checkb
  829.   format.title output
  830.   howpublished new.block.checka
  831.   howpublished output
  832.   format.date output
  833.   new.block
  834.   note output
  835.   fin.entry
  836.   empty.misc.check
  837. }
  838.  
  839. FUNCTION {phdthesis}
  840. { output.bibitem
  841.   format.authors "author" output.check
  842.   new.block
  843.   format.btitle "title" output.check
  844.   new.block
  845. % A PhD thesis is called ``Dissertation'' in German
  846. %  "PhD thesis" format.thesis.type output.nonnull
  847.   "Dissertation" format.thesis.type output.nonnull
  848.   school "school" output.check
  849.   address output
  850.   format.date "year" output.check
  851.   new.block
  852.   note output
  853.   fin.entry
  854. }
  855.  
  856. FUNCTION {proceedings}
  857. { output.bibitem
  858.   editor empty$
  859.     { organization output }
  860.     { format.editors output.nonnull }
  861.   if$
  862.   new.block
  863.   format.btitle "title" output.check
  864.   format.bvolume output
  865.   format.number.series output
  866.   address empty$
  867.     { editor empty$
  868.         { publisher new.sentence.checka }
  869.         { organization publisher new.sentence.checkb
  870.           organization output
  871.         }
  872.       if$
  873.       publisher output
  874.       format.date "year" output.check
  875.     }
  876.     { address output.nonnull
  877.       format.date "year" output.check
  878.       new.sentence
  879.       editor empty$
  880.         'skip$
  881.         { organization output }
  882.       if$
  883.       publisher output
  884.     }
  885.   if$
  886.   new.block
  887.   note output
  888.   fin.entry
  889. }
  890.  
  891. FUNCTION {techreport}
  892. { output.bibitem
  893.   format.authors "author" output.check
  894.   new.block
  895.   format.title "title" output.check
  896.   new.block
  897.   format.tr.number output.nonnull
  898.   institution "institution" output.check
  899.   address output
  900.   format.date "year" output.check
  901.   new.block
  902.   note output
  903.   fin.entry
  904. }
  905.  
  906. FUNCTION {unpublished}
  907. { output.bibitem
  908.   format.authors "author" output.check
  909.   new.block
  910.   format.title "title" output.check
  911.   new.block
  912.   note "note" output.check
  913.   format.date output
  914.   fin.entry
  915. }
  916.  
  917. FUNCTION {default.type} { misc }
  918.  
  919. % Changed the names of the months
  920.  
  921. MACRO {jan} {"Januar"}
  922.  
  923. MACRO {feb} {"Februar"}
  924.  
  925. % problems with the umlaut ! Geloest 7.2.92 A.Schilling
  926. MACRO {mar} {"\Marz"}
  927.  
  928. MACRO {apr} {"April"}
  929.  
  930. MACRO {may} {"Mai"}
  931.  
  932. MACRO {jun} {"Juni"}
  933.  
  934. MACRO {jul} {"Juli"}
  935.  
  936. MACRO {aug} {"August"}
  937.  
  938. MACRO {sep} {"September"}
  939.  
  940. MACRO {oct} {"Oktober"}
  941.  
  942. MACRO {nov} {"November"}
  943.  
  944. MACRO {dec} {"Dezember"}
  945.  
  946. MACRO {acmcs} {"ACM Computing Surveys"}
  947.  
  948. MACRO {acta} {"Acta Informatica"}
  949.  
  950. MACRO {cacm} {"Communications of the ACM"}
  951.  
  952. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  953.  
  954. MACRO {ibmsj} {"IBM Systems Journal"}
  955.  
  956. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  957.  
  958. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  959.  
  960. MACRO {ieeetcad}
  961.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  962.  
  963. MACRO {ipl} {"Information Processing Letters"}
  964.  
  965. MACRO {jacm} {"Journal of the ACM"}
  966.  
  967. MACRO {jcss} {"Journal of Computer and System Sciences"}
  968.  
  969. MACRO {scp} {"Science of Computer Programming"}
  970.  
  971. MACRO {sicomp} {"SIAM Journal on Computing"}
  972.  
  973. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  974.  
  975. MACRO {tods} {"ACM Transactions on Database Systems"}
  976.  
  977. MACRO {tog} {"ACM Transactions on Graphics"}
  978.  
  979. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  980.  
  981. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  982.  
  983. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  984.  
  985. MACRO {tcs} {"Theoretical Computer Science"}
  986.  
  987. READ
  988.  
  989. FUNCTION {sortify}
  990. { purify$
  991.   "l" change.case$
  992. }
  993.  
  994. INTEGERS { len }
  995.  
  996. FUNCTION {chop.word}
  997. { 's :=
  998.   'len :=
  999.   s #1 len substring$ =
  1000.     { s len #1 + global.max$ substring$ }
  1001.     's
  1002.   if$
  1003. }
  1004.  
  1005. INTEGERS { et.al.char.used }
  1006.  
  1007. FUNCTION {initialize.et.al.char.used}
  1008. { #0 'et.al.char.used :=
  1009. }
  1010.  
  1011. EXECUTE {initialize.et.al.char.used}
  1012.  
  1013. FUNCTION {format.lab.names}
  1014. { 's :=
  1015.   s num.names$ 'numnames :=
  1016.   numnames #1 >
  1017.     { numnames #4 >
  1018.         { #3 'namesleft := }
  1019.         { numnames 'namesleft := }
  1020.       if$
  1021.       #1 'nameptr :=
  1022.       ""
  1023.         { namesleft #0 > }
  1024.         { nameptr numnames =
  1025.             { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1026.                 { "{\etalchar{+}}" *
  1027.                   #1 'et.al.char.used :=
  1028.                 }
  1029.                 { s nameptr "{v{}}{l{}}" format.name$ * }
  1030.               if$
  1031.             }
  1032.             { s nameptr "{v{}}{l{}}" format.name$ * }
  1033.           if$
  1034.           nameptr #1 + 'nameptr :=
  1035.           namesleft #1 - 'namesleft :=
  1036.         }
  1037.       while$
  1038.       numnames #4 >
  1039.         { "{\etalchar{+}}" *
  1040.           #1 'et.al.char.used :=
  1041.         }
  1042.         'skip$
  1043.       if$
  1044.     }
  1045.     { s #1 "{v{}}{l{}}" format.name$
  1046.       duplicate$ text.length$ #2 <
  1047.         { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
  1048.         'skip$
  1049.       if$
  1050.     }
  1051.   if$
  1052. }
  1053.  
  1054. FUNCTION {author.key.label}
  1055. { author empty$
  1056.     { key empty$
  1057.         { cite$ #1 #3 substring$ }
  1058.         { key #3 text.prefix$ }
  1059.       if$
  1060.     }
  1061.     { author format.lab.names }
  1062.   if$
  1063. }
  1064.  
  1065. FUNCTION {author.editor.key.label}
  1066. { author empty$
  1067.     { editor empty$
  1068.         { key empty$
  1069.             { cite$ #1 #3 substring$ }
  1070.             { key #3 text.prefix$ }
  1071.           if$
  1072.         }
  1073.         { editor format.lab.names }
  1074.       if$
  1075.     }
  1076.     { author format.lab.names }
  1077.   if$
  1078. }
  1079.  
  1080. FUNCTION {author.key.organization.label}
  1081. { author empty$
  1082.     { key empty$
  1083.         { organization empty$
  1084.             { cite$ #1 #3 substring$ }
  1085.             { "The " #4 organization chop.word #3 text.prefix$ }
  1086.           if$
  1087.         }
  1088.         { key #3 text.prefix$ }
  1089.       if$
  1090.     }
  1091.     { author format.lab.names }
  1092.   if$
  1093. }
  1094.  
  1095. FUNCTION {editor.key.organization.label}
  1096. { editor empty$
  1097.     { key empty$
  1098.         { organization empty$
  1099.             { cite$ #1 #3 substring$ }
  1100.             { "The " #4 organization chop.word #3 text.prefix$ }
  1101.           if$
  1102.         }
  1103.         { key #3 text.prefix$ }
  1104.       if$
  1105.     }
  1106.     { editor format.lab.names }
  1107.   if$
  1108. }
  1109.  
  1110. FUNCTION {calc.label}
  1111. { type$ "book" =
  1112.   type$ "inbook" =
  1113.   or
  1114.     'author.editor.key.label
  1115.     { type$ "proceedings" =
  1116.         'editor.key.organization.label
  1117.         { type$ "manual" =
  1118.             'author.key.organization.label
  1119.             'author.key.label
  1120.           if$
  1121.         }
  1122.       if$
  1123.     }
  1124.   if$
  1125.   duplicate$
  1126.   year field.or.null purify$ #-1 #2 substring$
  1127.   *
  1128.   'label :=
  1129.   year field.or.null purify$ #-1 #4 substring$
  1130.   *
  1131.   sortify 'sort.label :=
  1132. }
  1133.  
  1134. FUNCTION {sort.format.names}
  1135. { 's :=
  1136.   #1 'nameptr :=
  1137.   ""
  1138.   s num.names$ 'numnames :=
  1139.   numnames 'namesleft :=
  1140.     { namesleft #0 > }
  1141.     { nameptr #1 >
  1142.         { "   " * }
  1143.         'skip$
  1144.       if$
  1145.       s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  1146.       nameptr numnames = t "others" = and
  1147.         { "et al" * }
  1148.         { t sortify * }
  1149.       if$
  1150.       nameptr #1 + 'nameptr :=
  1151.       namesleft #1 - 'namesleft :=
  1152.     }
  1153.   while$
  1154. }
  1155.  
  1156. FUNCTION {sort.format.title}
  1157. { 't :=
  1158.   "A " #2
  1159.     "An " #3
  1160.       "The " #4 t chop.word
  1161.     chop.word
  1162.   chop.word
  1163.   sortify
  1164.   #1 global.max$ substring$
  1165. }
  1166.  
  1167. FUNCTION {author.sort}
  1168. { author empty$
  1169.     { key empty$
  1170.         { "to sort, need author or key in " cite$ * warning$
  1171.           ""
  1172.         }
  1173.         { key sortify }
  1174.       if$
  1175.     }
  1176.     { author sort.format.names }
  1177.   if$
  1178. }
  1179.  
  1180. FUNCTION {author.editor.sort}
  1181. { author empty$
  1182.     { editor empty$
  1183.         { key empty$
  1184.             { "to sort, need author, editor, or key in " cite$ * warning$
  1185.               ""
  1186.             }
  1187.             { key sortify }
  1188.           if$
  1189.         }
  1190.         { editor sort.format.names }
  1191.       if$
  1192.     }
  1193.     { author sort.format.names }
  1194.   if$
  1195. }
  1196.  
  1197. FUNCTION {author.organization.sort}
  1198. { author empty$
  1199.     { organization empty$
  1200.         { key empty$
  1201.             { "to sort, need author, organization, or key in " cite$ * warning$
  1202.               ""
  1203.             }
  1204.             { key sortify }
  1205.           if$
  1206.         }
  1207.         { "The " #4 organization chop.word sortify }
  1208.       if$
  1209.     }
  1210.     { author sort.format.names }
  1211.   if$
  1212. }
  1213.  
  1214. FUNCTION {editor.organization.sort}
  1215. { editor empty$
  1216.     { organization empty$
  1217.         { key empty$
  1218.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1219.               ""
  1220.             }
  1221.             { key sortify }
  1222.           if$
  1223.         }
  1224.         { "The " #4 organization chop.word sortify }
  1225.       if$
  1226.     }
  1227.     { editor sort.format.names }
  1228.   if$
  1229. }
  1230.  
  1231. FUNCTION {presort}
  1232. { calc.label
  1233.   sort.label
  1234.   "    "
  1235.   *
  1236.   type$ "book" =
  1237.   type$ "inbook" =
  1238.   or
  1239.     'author.editor.sort
  1240.     { type$ "proceedings" =
  1241.         'editor.organization.sort
  1242.         { type$ "manual" =
  1243.             'author.organization.sort
  1244.             'author.sort
  1245.           if$
  1246.         }
  1247.       if$
  1248.     }
  1249.   if$
  1250.   *
  1251.   "    "
  1252.   *
  1253.   year field.or.null sortify
  1254.   *
  1255.   "    "
  1256.   *
  1257.   title field.or.null
  1258.   sort.format.title
  1259.   *
  1260.   #1 entry.max$ substring$
  1261.   'sort.key$ :=
  1262. }
  1263.  
  1264. ITERATE {presort}
  1265.  
  1266. SORT
  1267.  
  1268. STRINGS { longest.label last.sort.label next.extra }
  1269.  
  1270. INTEGERS { longest.label.width last.extra.num }
  1271.  
  1272. FUNCTION {initialize.longest.label}
  1273. { "" 'longest.label :=
  1274.   #0 int.to.chr$ 'last.sort.label :=
  1275.   "" 'next.extra :=
  1276.   #0 'longest.label.width :=
  1277.   #0 'last.extra.num :=
  1278. }
  1279.  
  1280. FUNCTION {forward.pass}
  1281. { last.sort.label sort.label =
  1282.     { last.extra.num #1 + 'last.extra.num :=
  1283.       last.extra.num int.to.chr$ 'extra.label :=
  1284.     }
  1285.     { "a" chr.to.int$ 'last.extra.num :=
  1286.       "" 'extra.label :=
  1287.       sort.label 'last.sort.label :=
  1288.     }
  1289.   if$
  1290. }
  1291.  
  1292. FUNCTION {reverse.pass}
  1293. { next.extra "b" =
  1294.     { "a" 'extra.label := }
  1295.     'skip$
  1296.   if$
  1297.   label extra.label * 'label :=
  1298.   label width$ longest.label.width >
  1299.     { label 'longest.label :=
  1300.       label width$ 'longest.label.width :=
  1301.     }
  1302.     'skip$
  1303.   if$
  1304.   extra.label 'next.extra :=
  1305. }
  1306.  
  1307. EXECUTE {initialize.longest.label}
  1308.  
  1309. ITERATE {forward.pass}
  1310.  
  1311. REVERSE {reverse.pass}
  1312.  
  1313. FUNCTION {begin.bib}
  1314. {  "\newcommand{\Marz}{M\" #34 int.to.chr$ * "arz }" *  write$ newline$
  1315. %Andreas Schilling 7.2.92
  1316.   et.al.char.used
  1317.     { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
  1318.     'skip$
  1319.   if$
  1320.   preamble$ empty$
  1321.     'skip$
  1322.     { preamble$ write$ newline$ }
  1323.   if$
  1324.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1325. }
  1326.  
  1327. EXECUTE {begin.bib}
  1328.  
  1329. EXECUTE {init.state.consts}
  1330.  
  1331. ITERATE {call.type$}
  1332.  
  1333. FUNCTION {end.bib}
  1334. { newline$
  1335.   "\end{thebibliography}" write$ newline$
  1336. }
  1337.  
  1338. EXECUTE {end.bib}
  1339.  
  1340.  
  1341.